package com.kaede.hayate.common.exception;

import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.InsufficientAuthenticationException;
import org.springframework.security.authentication.LockedException;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

public class GlobalException {
	
	public static final ExceptionMessage[] exceptionPool = {
			new ExceptionMessage(UsernameNotFoundException.class, "10000", "用户不存在"),
			new ExceptionMessage(BadCredentialsException.class, "10001", "用户名或密码错误"),
			new ExceptionMessage(LockedException.class, "10002", "账户被锁定"),
			new ExceptionMessage(AccessDeniedException.class, "10003", "权限不足"),
			new ExceptionMessage(InsufficientAuthenticationException.class, "10004", "请登录"),
			new ExceptionMessage(HttpMessageNotReadableException.class, "10005", "数据格式错误")
	};

}
